package com.sfh.cpc.com.entity;

import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.RequiresApi;
import android.text.TextUtils;

import com.sfh.cpc.com.BaseAppContent;

import java.util.Base64;

/**
 * 功能描述: TODO
 *
 * @author SunFeihu 孙飞虎
 * @date 2018/8/16
 */
public class EMass implements Parcelable{

    long massId;
    long massUserId;//创建者ID
    long noteSize;//话题数量
    String massTitle;// 标题,

    String massContent;//简介
    String massCreateTime;//创建时间
    String massUrl;
    String noteVip;//特权查看 1:需要否则不需要

    long todayMsgSize;
    long todayNoteSize;
    long massConsumeWealth;

    public EMass(){}
    protected EMass(Parcel in) {
        massId = in.readLong();
        massUserId = in.readLong();
        noteSize = in.readLong();
        massTitle = in.readString();
        massContent = in.readString();
        massCreateTime = in.readString();
        massUrl = in.readString();
        noteVip = in.readString();
        todayMsgSize = in.readLong();
        todayNoteSize = in.readLong();
        massConsumeWealth  = in.readLong();
    }

    public static final Creator<EMass> CREATOR = new Creator<EMass>() {
        @Override
        public EMass createFromParcel(Parcel in) {
            return new EMass(in);
        }

        @Override
        public EMass[] newArray(int size) {
            return new EMass[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(massId);
        dest.writeLong(massUserId);
        dest.writeLong(noteSize);
        dest.writeString(massTitle);
        dest.writeString(massContent);
        dest.writeString(massCreateTime);
        dest.writeString(massUrl);
        dest.writeString(noteVip);
        dest.writeLong(todayMsgSize);
        dest.writeLong(todayNoteSize);
        dest.writeLong(massConsumeWealth);

    }

    public long getMassId() {
        return massId;
    }

    public long getMassUserId() {
        return massUserId;
    }

    public long getNoteSize() {
        return noteSize;
    }

    public String getMassTitle() {
        return BaseAppContent.decode(massTitle);
    }

    public String getMassContent() {

        return BaseAppContent.decode(massContent);
    }

    public String getMassCreateTime() {
        return massCreateTime;
    }

    public String getMassUrl() {
        return massUrl;
    }

    public String getNoteVip() {
        return noteVip;
    }

    public long getTodayMsgSize() {
        return todayMsgSize;
    }

    public long getTodayNoteSize() {
        return todayNoteSize;
    }

    public long getMassConsumeWealth() {
        return massConsumeWealth;
    }

    public void setNoteVip(String noteVip) {
        this.noteVip = noteVip;
    }
}
